package com.java.module.chat.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.java.common.lang.annotation.Excel;
import com.java.common.lang.domain.BaseEntity;

/**
 * 聊天：消息对象 chat_message
 * 
 * @author Administrator
 * @date 2021-05-13
 */
public class ChatMessage extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long messageId;

    /** $column.columnComment */
    private Long sessionId;

    /** $column.columnComment */
    private Long adminSessionId;

    /** 平台标志：1安卓 2苹果 3电脑 */
    @Excel(name = "平台标志：1安卓 2苹果 3电脑")
    private Integer platform;

    /** ip地址 */
    @Excel(name = "ip地址")
    private String ipaddress;

    /** 客服对象：0售前 1售中 2售后 */
    @Excel(name = "客服对象：0售前  1售中  2售后")
    private Integer chatType;



    /** 会话类型：1单聊 2群聊（保留字段） */
    @Excel(name = "会话类型：1单聊 2群聊", readConverterExp = "保=留字段")
    private Integer sessionType;

    /** 消息类型：1文本 2图片 */
    @Excel(name = "消息类型：1文本 2图片")
    private Integer msgType;

    /** 0用户消息 1后台消息 */
    @Excel(name = "0用户消息 1后台消息")
    private Integer userType;

    /** 消息状态：0未读 1已读 */
    @Excel(name = "消息状态：0未读 1已读")
    private Integer msgStatus;

    /** 发送者uid */
    @Excel(name = "发送者uid")
    private Long msgFromUid;

    /** 接收者uid */
    @Excel(name = "接收者uid")
    private Long msgToUid;

    /** 消息内容 */
    @Excel(name = "消息内容")
    private String msgContent;

    /** 发送者删除状态：0默认 1已删除 */
    @Excel(name = "发送者删除状态：0默认 1已删除 ")
    private Integer msgFromIsdel;

    /** 接收者删除状态：0默认 1已删除 */
    @Excel(name = "接收者删除状态：0默认 1已删除")
    private Integer msgToIsdel;

    /** 视频封面图片 */
    @Excel(name = "视频封面图片")
    private String videoPic;

    /** 删除标志（0默认 非0表示已删除） */
    private Integer delFlag;

    private MsgExtra msgExtra;


    // 1 跑腿  2 医生
    private Integer type;

    private Integer duration;

    private String key;

    public MsgExtra getMsgExtra() {
        return msgExtra;
    }

    public void setMsgExtra(MsgExtra msgExtra) {
        this.msgExtra = msgExtra;
    }

    public void setMessageId(Long messageId) {
        this.messageId = messageId;
    }

    public Long getMessageId() {
        return messageId;
    }

    public Long getSessionId() {
        return sessionId;
    }

    public void setSessionId(Long sessionId) {
        this.sessionId = sessionId;
    }

    public Long getAdminSessionId() {
        return adminSessionId;
    }

    public void setAdminSessionId(Long adminSessionId) {
        this.adminSessionId = adminSessionId;
    }

    public void setPlatform(Integer platform) {
        this.platform = platform;
    }

    public Integer getPlatform() {
        return platform;
    }

    public void setIpaddress(String ipaddress) {
        this.ipaddress = ipaddress;
    }

    public String getIpaddress() {
        return ipaddress;
    }

    public void setChatType(Integer chatType) {
        this.chatType = chatType;
    }

    public Integer getChatType() {
        return chatType;
    }

    public void setSessionType(Integer sessionType) {
        this.sessionType = sessionType;
    }

    public Integer getSessionType() {
        return sessionType;
    }

    public void setMsgType(Integer msgType) {
        this.msgType = msgType;
    }

    public Integer getMsgType() {
        return msgType;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public void setMsgStatus(Integer msgStatus) {
        this.msgStatus = msgStatus;
    }

    public Integer getMsgStatus() {
        return msgStatus;
    }

    public void setMsgFromUid(Long msgFromUid) {
        this.msgFromUid = msgFromUid;
    }

    public Long getMsgFromUid() {
        return msgFromUid;
    }

    public void setMsgToUid(Long msgToUid) {
        this.msgToUid = msgToUid;
    }

    public Long getMsgToUid() {
        return msgToUid;
    }

    public void setMsgContent(String msgContent) {
        this.msgContent = msgContent;
    }

    public String getMsgContent() {
        return msgContent;
    }

    public void setMsgFromIsdel(Integer msgFromIsdel) {
        this.msgFromIsdel = msgFromIsdel;
    }

    public Integer getMsgFromIsdel() {
        return msgFromIsdel;
    }

    public void setMsgToIsdel(Integer msgToIsdel) {
        this.msgToIsdel = msgToIsdel;
    }

    public Integer getMsgToIsdel() {
        return msgToIsdel;
    }

    public void setVideoPic(String videoPic) {
        this.videoPic = videoPic;
    }

    public String getVideoPic() {
        return videoPic;
    }

    public void setDelFlag(Integer delFlag) {
        this.delFlag = delFlag;
    }

    public Integer getDelFlag() {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("messageId", getMessageId())
                .append("sessionId", getSessionId()).append("adminSessionId", getAdminSessionId())
                .append("platform", getPlatform()).append("ipaddress", getIpaddress()).append("chatType", getChatType())
                .append("sessionType", getSessionType()).append("msgType", getMsgType())
                .append("userType", getUserType()).append("msgStatus", getMsgStatus())
                .append("msgFromUid", getMsgFromUid()).append("msgToUid", getMsgToUid())
                .append("msgContent", getMsgContent()).append("msgFromIsdel", getMsgFromIsdel())
                .append("msgToIsdel", getMsgToIsdel()).append("videoPic", getVideoPic())
                .append("createTime", getCreateTime()).append("updateTime", getUpdateTime())
                .append("delFlag", getDelFlag()).toString();
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public static class MsgExtra {
        private String toEcardNumber;
        private String fromEcardNumber;

        public String getToEcardNumber() {
            return toEcardNumber;
        }

        public void setToEcardNumber(String toEcardNumber) {
            this.toEcardNumber = toEcardNumber;
        }

        public String getFromEcardNumber() {
            return fromEcardNumber;
        }

        public void setFromEcardNumber(String fromEcardNumber) {
            this.fromEcardNumber = fromEcardNumber;
        }
    }

}